package Fuxi;
        import java.util.Scanner;
public class ArraysTest {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        String []name={"aa","bb","cc","ff"};
        System.out.println("请输入要删除的字符");
        String jianname=scan.next();
        int i=0;
        for(;i<name.length;i++) {
            if (jianname.equals(name[i])) {
                for (int j = i; j < name.length - 1; j++) {
                    name[j] = name[j + 1];
                }
                name[name.length - 1] = null;
                break;
            }else if (!jianname.equals(name[i])){
               continue;
            }
        }
        if(i==name.length){
            System.out.println("没有找到输入的字符");
        }
        System.out.println("数组中剩余字符如下：");
        for(int j=0;j<name.length;j++){
            System.out.print(name[j]+" ");
        }
    }
}
